<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <base th:href="@{/}">
    <meta charset="UTF-8">
    <title>用户管理</title>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <script src="js/jquery.min.js"></script>
</head>
<body>
    <!-- 加载header.html -->
    <div th:include="admin/header"></div>
    <br><br><br>
    <section class="home-section">
        <div class="home-content">
            <i class='bx bx-menu' ></i>
            <span class="text">管理员界面</span>
        </div>
        <div class="test">
            <div class="container">
                <div class="panel panel-primary" style="border-radius: 0px 0px 25px 25px">
                    <div class="panel-heading" style="background-color: rgba(85,81,133,0.6);">
                        <h3 class="panel-title">用户列表</h3>
                    </div>
                    <div class="panel-body">
                        <div class="table table-responsive">
                            <table class="table table-bordered table-hover">
                                <tbody class="text-center">
                                <tr>
                                    <th style="text-align: center">用户ID</th>
                                    <th style="text-align: center">用户手机号码</th>
                                </tr>
                                <tr th:each="u:${allUsers}">
                                        <td th:text="${u.id}"></td>
                                    <td th:text="${u.phone_number}"></td>
                                </tr>
                                <tr>
                                    <td colspan="3" align="right">
                                        <ul class="pagination">
                                            <li><a>第<span th:text="${currentPage}"></span>页</a></li>
                                            <li><a>共<span th:text="${totalPage}"></span>页</a></li>
                                            <li>
											<span th:if="${currentPage} != 1">
												<a th:href="@{selectUser?currentPage=${currentPage - 1}}">上一页</a>
											</span>
                                                <span th:if="${currentPage} != ${totalPage}">
												<a th:href="@{selectUser?currentPage=${currentPage - 1}}">下一页</a>
											</span>
                                            </li>
                                        </ul>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

</body>
</html>
